<div class="_top">
    <div class="topbar">
        <div class="box">
            <div class="item_left">
                <div>
                    语言:
                    <select name="language" class="language">
                        <option>简体中文</option>
                        <option>English</option>
                        <option>日本語</option>
                    </select>
                </div>
            </div>
            <div class="item_right">
                <div class="item">
                    <a>购物车</a>
                </div>
                {{#if loginer}}
                    <div class="item"><a id="loginer_info" class="icon-user" href="./personal.html" target="blank">{{loginer.info.name}}</a>
                    </div>
                    <div class="item"><a event-click="{{'$Event.user_login_out'}}" id="login_out" href="#">注销</a>
                    </div>
                {{#else}} 
                    {{#if $Cache._in_sign_in_or_up}} 
                    {{#else}}
                    <div class="item">
                        <a href="#default/account" target="_blank">登陆</a>
                    </div>
                    <div class="item">
                        <a href="#default/account" target="_blank">注册</a>
                    </div>
                    {{/if}} 
                {{/if}}
                
            </div>
        </div>
    </div>

    <div class="info">
        <div class="box">
            <div class="info_left">
                <div class="staut">营业中！</div>
                <div class="number">联系我们：18859150447</div>
            </div>
            <div class="info_medium">
            	<span class="store_name">
            		{{bus_info.info.title}}
            	</span>
            </div>
            <div class="info_right">
            	<button class="icon-cart"></button>
            	<div class="cart_box">
            		<div><b>购物车</b></div>
            		<div>0件 - $0.00</div>
            	</div>
            </div>
        </div>
    </div>

    <div class="listbar">
    	<div class="list">
    		<div class="item focus"><a>首页</a></div>
            <div class="item"><a>全部商品</a></div>
            <div class="item"><a>销量最高</a></div>
    		<div class="item"><a>热门促销</a></div>
    		<div class="item"><a>关于本店</a></div>
    		<div class="item"><a>点击收藏</a></div>
    		<div class="item"><a>帮助</a></div>
    	</div>
    	<div class="search_box">
    		<input type="text" class="searchinput" />
    		<i class="icon-search"></i>
    	</div>
    </div>
</div>

<script type="text/vm">
    function (vm) {
        require(["common"], function(jSouper) {
            // var sign_in_btn_node = vm.queryElement({id:"sign_in_btn"})[0];
            // var sign_up_btn_node = vm.queryElement({id:"sign_up_btn"})[0];
            // var login_out_btn_node = vm.queryElement({id:"login_out"})[0];
            if (location.pathname !== "/sign_in.html") {
                var cb_url = "&cb_url=" + encodeURIComponent(location.href);
                // sign_in_btn_node.href += cb_url;
                // sign_up_btn_node.href += cb_url;
                App.set("$Cache.cb_url", cb_url);
            } else {
                App.set("$Cache._in_sign_in_or_up", true);
            }
            //注销功能
            jSouper.ready(function() {
                App.set("$Event.user_login_out", function() {
                    require(["Cookies"], function(Cookies) {
                        Cookies.set("loginSession", "");
                    });
                    App.set("loginer", null);
                });
            });
        });
    }
</script>
